package com.geekarchitect.patterns.visitor.geek;

import com.geekarchitect.patterns.visitor.geek.v3.*;

import java.util.ArrayList;
import java.util.List;

/**
 * @author Hongliang Zhu
 * @create 2023-01-07 21:44
 */
public class ToolApplication3 {

    public static void main(String[] args) {
        Extractor extractor = new Extractor();
        Compressor compressor = new Compressor();
        List<ResourceFile> resourceFiles = listAllFiles("/");
        for (ResourceFile file : resourceFiles){
            file.accept(extractor);
            file.accept(compressor);
        }

    }


    private static List<ResourceFile> listAllFiles(String dir) {
        List<ResourceFile> list = new ArrayList<>();
        list.add(new PPTFile("a.pdf"));
        list.add(new WordFile("b.word"));
        list.add(new PdfFile("c.pdf"));
        return list;

    }
}
